/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaidiot;

/**
 *
 * @author Master
 */
public class Interface {

    /*
     * @return 
     */
    private static void out(String s) {
        System.out.println(s);
    }

    public static void main(String[] args) {
        String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
        //String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
        String server = "jdbc:sqlserver://localhost:1433";
        //String server = "jdbc:odbc:salnalex";
        //String props = ";integratedSecurity=false;database=javaidiot;username=javaidiot;password=javaidiot;";
        String props = ";integratedSecurity=false;database=javaidiot;username=user;password=user123;";
        //String props = "";
        //String dbQuery = "select EmployeeName, OrderID, PhoneNumber from Employees, OrderExecutor where Employees.EmployeeID = OrderExecutor.EmployeeID;";
        SQLConnection db = new SQLConnection(driver, server, props);
        try {
            db.setConnection();
        } catch (Exception e) {
            out(e.getMessage());
        }
        if (db.isConnected()) {
            // Start interface
            Window w = new Window(db);
            w.pack();
            w.setVisible(true);
            
            // Controller
        }
        
        //db.close();

    }
}
